From 6ab3d2a42109645b5b3fccc8838afa0fcf9ff4dd Mon Sep 17 00:00:00 2001 From: "vhanquez@kneesa.uk.xensource.com" Date: Tue, 24 Jan 2006 10:37:44 +0000 Subject: [PATCH] dup and open error value is -1, not < 0 Signed-off-by: Vincent Hanquez --- tools/xenstore/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xenstore/utils.c b/tools/xenstore/utils.c index 2bc40e009b..1bf8606b40 100644 --- a/tools/xenstore/utils.c +++ b/tools/xenstore/utils.c @@ -92,7 +92,7 @@ void *grab_file(const char *filename, unsigned long *size) else fd = open(filename, O_RDONLY, 0); - if (fd < 0) + if (fd == -1) return NULL; buffer = malloc(max+1); -- 2.30.2